<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function fn1() {
            // 一些代码 一些计算......
            return [1,2,true, 'end']
        }

        // 从函数返回多个值  react--useState hook
        let [a,b,c,d] = fn1();
        console.log(b);


        // 定义函数 fn2 在定义是指定函数的默认参数
        function fn2(arg1, arg2=5) {
            console.log(arg1+arg2);
        }
        fn2(12)
    </script>
</body>
</html>